package com.enation.app.javashop.api.client;

import com.enation.app.javashop.model.distribution.dos.CommissionTpl;
import com.enation.app.javashop.service.distribution.CommissionTplManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

/**
 * 模版client controller
 * @author liushuai(liushuai711@gmail.com)
 * @version v1.0
 * @since v7.0
 * 2018/8/14 下午2:17
 * @Description:
 *
 */
@RestController
@RequestMapping("/client/distribution")
@Validated
@ApiIgnore
public class CommissionTplClientController {

    @Autowired
    private CommissionTplManager commissionTplManager;

    /**
     * 获取默认模版
     * @return
     */
    @RequestMapping(value = "/tpl/default", method = RequestMethod.POST)
    public CommissionTpl getDefaultCommission(){
        return commissionTplManager.getDefaultCommission();
    }

}
